import com.alibaba.fastjson.JSONObject;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class TestList {

    public void changeName(){
        File file = new File("C:\\Users\\tom\\Desktop\\Square\\Square");

        File[] files = file.listFiles();

        for (File file1: files){
            System.out.println(file1.getName());

            file1.renameTo(new File(file1.getAbsolutePath().replace(" ","").replace("(","").replace(")","")));
        }

    }

    public static void main(String[] args) {

        String finalImage="https://cdn.discordapp.com/attachments/1113381791882035282/1126189286501400687/wlf456_3_None_8fd0d45e-2d0e-4985-815d-0ad4758c7fd7.png";
        String reId=finalImage.substring(finalImage.length()-40,finalImage.length()-4);
        System.out.println(reId);

//        System.out.println("03c43126-8de6-4ca7-9459-ee28a70de1c4".length());

//        int num = new Random().nextInt(99) + 1;
//        System.out.println("https://www.shejiai.cc/v1/image/head"+num+".png");

    }
}
